import request from '@/utils/request'

/**
 * 添加任务到成长盒
 * @param {Object} data - { taskId, note }
 */
export function addTaskToGrowthBox(data) {
  return request({
    url: '/growth-box/add',
    method: 'post',
    params: data
  })
}

/**
 * 获取成长盒任务列表
 */
export function getGrowthBoxTasks() {
  return request({
    url: '/growth-box/list',
    method: 'get'
  })
}

/**
 * 从成长盒移除任务
 * @param {Number} itemId - 成长盒项ID
 */
export function removeFromGrowthBox(itemId) {
  return request({
    url: `/growth-box/remove/${itemId}`,
    method: 'delete'
  })
}

/**
 * 检查任务是否在成长盒中
 * @param {Number} taskId - 任务ID
 */
export function checkTaskInGrowthBox(taskId) {
  return request({
    url: `/growth-box/check/${taskId}`,
    method: 'get'
  })
}

/**
 * 批量获取成长盒中的所有任务ID
 */
export function getGrowthBoxTaskIds() {
  return request({
    url: '/growth-box/task-ids',
    method: 'get'
  })
}
